package com.shen.pojo.car;

/**
 * Author:shen
 * CreateDate:2020/5/13.
 * Function:检测厂
 */
public class CarTest {
    public void carCheck(Object object){
        //检测是否继承接口
        if(Car.class.isAssignableFrom(object.getClass())){
            System.out.println("车辆合格");
        }else{
            System.out.println("车辆不合格");
        }
    }
}
